import Login from "./views/Login.vue";
import Home from "./views/Home.vue";
import NotFound from "./views/404.vue";

import Dashboard from "./views/dashbord/DashBoard.vue";

import User from "./views/acl/User.vue";
import Role from "./views/acl/Role.vue";
import Permission from "./views/acl/Permission.vue";

import Provenance from "./views/material/Provenance.vue"
import Manor from "./views/material/Manor.vue"

import Storage from "./views/material/Storage.vue"

import Transport from "./views/trade/Transport.vue"

import Manufacturer from "./views/p&q/Manufacturer.vue"
import Quality from "./views/p&q/Quality.vue"

import Material from "./views/material/Material.vue"
import Product from "./views/m&p/Product.vue"

let routes = [
  {
    path: "/",
    component: Login,
    name: "",
    hidden: true
  },
  {
    path: "/404",
    component: NotFound,
    name: "",
    hidden: true
  },
  {
    path: "/",
    component: Home,
    name: "主页",
    leaf: true,
    iconCls: "el-icon-fa-dashboard", //图标样式class
    children: [
      {
        path: "/dashboard",
        iconCls: "el-icon-fa-dashboard",
        component: Dashboard,
        name: "Dashboard"
      }
    ]
  },
  {
    path: "/",
    component: Home,
    name: "访问控制",
    iconCls: "el-icon-fa-users", //图标样式class
    children: [
      {
        path: "/user",
        iconCls: "el-icon-fa-user",
        component: User,
        meta: {
          p: "user.list"
        },
        name: "用户管理"
      },
      {
        path: "/role",
        iconCls: "el-icon-fa-lock",
        component: Role,
        meta: {
          p: "role.list"
        },
        name: "角色管理"
      },
      {
        path: "/permission",
        iconCls: "el-icon-fa-eye",
        component: Permission,
        meta: {
          p: "permission.list"
        },
        name: "权限管理"
      }
    ]
  },
  {
    path: "/",
    component: Home,
    name: "溯源信息",
    iconCls: "el-icon-fa-map", //图标样式class
    children: [
      {
        path: "/area",
        iconCls: "el-icon-fa-map-o",
        component: Provenance,
        meta: {
          p: "area.list"
        },
        name: "产区管理"
      },
      {
        path: "/manor",
        iconCls: "el-icon-fa-bank",
        component: Manor,
        meta: {
          p: "manor.list"
        },
        name: "庄园管理"
      },
      {
        path: "/transport",
        iconCls: "el-icon-fa-sign-in",
        component: Transport,
        meta: {
          p: "transport.list"
        },
        name: "进出口管理"
      },
      {
        path: "/storage",
        iconCls: "el-icon-fa-institution",
        component: Storage,
        meta: {
          p: "storage.list"
        },
        name: "仓库列表"
      },
      {
        path: "/material",
        iconCls: "el-icon-fa-circle",
        component: Material,
        meta: {
          p: "material.list"
        },
        name: "原料管理"
      },
      {
        path: "/product",
        iconCls: "el-icon-fa-shopping-bag",
        component: Product,
        meta: {
          p: "product.list"
        },
        name: "产品信息"
      }
    ]
  }
];

export default routes;
